package cn.hiapi.shopkeeper.entity.activity;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @author AdinZ
 * @date 2023/1/3 22:28
 */
@Entity
@Table(name = "hiapi_shopkeeper_activity_solitaire_item")
@ApiModel(description = "接龙")
@Getter
@Setter
public class ActivitySolitaireItem extends BasicEntity {

    @Id
    @GeneratedValue(generator = "snowflake")
    @GenericGenerator(name = "snowflake", strategy = "cn.hiapi.basic.id.SnowflakeId")
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;

    @ApiModelProperty("活动id")
    private long aid;
    @ApiModelProperty("店铺id")
    private long shopId;

    @ApiModelProperty("人数")
    @Column(name = "_count")
    private int count;

    @ApiModelProperty("梯队,顺序从0开始 最大4 最大共计5个梯队")
    @Column(name = "_index")
    private int index;

    @ApiModelProperty("优惠")
    @Column(columnDefinition = "decimal(12,2)")
    private BigDecimal rate=BigDecimal.ZERO;






}
